This invention is related in general to the field of object-oriented technology and distributed computing. More particularly, the invention is related to a method of communicating between objects and agents across a computer network.
In object-oriented programming, real world objects are modeled by software objects that have encapsulated therein special procedures and data elements. In object-oriented programming jargon, procedures are referred to as methods. To avoid having to redefine the same methods and data members for each and every occurrence of an object, object-oriented programming provides the concept of classes. An inheritance structure of one or more levels of increasingly more specialized classes is created to provide templates that define the methods and variables to be included in the objects of each class. Therefore, an object belonging to a class is a member of that class, and contains the special behavior defined by the class. In this manner, each object is an instance of a defined class or template and the need to redefine the methods and data members for each occurrence of the object is eliminated.
With the rise of distributed systems, client/server computing, and internet/intranet interactions, inter-node communications between applications have become a prerequisite. Early operating systems lacked support for inter-application communications, forcing software developers to write custom code to perform remote procedure call (RPC) for each and every application that needed remote communications.
Microsoft(trademark) has developed DCOM(trademark) (Distributed COM) to support inter-application communications across networked computer systems. Another technology standard for inter-object communications is CORBA(trademark) (Common Object Request Broker Architecture) established by the Object Management Group (OMG) sponsored by more than 660 companies, including Digital Equipment Corporation(trademark), Hewlett Packard(trademark), IBM(trademark), and Sun Microsystems, Inc(trademark). CORBA defines how messages from one object to another are to be formatted and how to guarantee delivery. The messaging in CORBA is performed by object request brokers (ORBs). ORBs receive messages to determine the location of the receiving object, route the message, and perform all necessary platform and language translations. In object technology, a message is typically a request sent to an object to change its state or return a value. The object has encapsulated methods to implement the response to the received messages. Through technologies such as DCOM(trademark) and CORBA(trademark), objects can communicate with remote objects residing in other computer platforms connected by a network. However, a serious drawback of these objects under the conventional ORB technology is that they do not support the concept of mobility and therefore cannot move around the network to other computer platforms.
Enter the concept of agents. Agents are defined as specialized objects that possess the characteristic of autonomy. Autonomy is the ability to program an agent with one or more goals that it will attempt to satisfy, even when it has moved into a network onto other platforms and has lost all contact with its creator. General Magic, Inc.(trademark) of Sunnyvale, Calif. has developed a set of interpreted object-oriented computer instructions called Telescript(trademark). By using Telescript(trademark) computer instructions, an agent may move from one place to another place by specifying the destination address, name, and/or class. However in Telescript(trademark), agents cannot communicate remotely across the network. In other words, Telescript agents must occupy the same place in order for them to interact. Further, in order for two agents to interact, they must travel to a pre-established place known to both agents. This presents some very serious restrictions to the ability for agents to communicate with one another.
Another agent technology called Aglet(trademark) has been introduced by IBM(trademark). A significant difference between Aglets(trademark) and Telescript(trademark) is that Aglets is based on Java(trademark), Sun Microsystems Inc.""s computer programming language. Although Aglet(trademark) allows agent movement across the network, the destination must be a pre-established place known to the agent as in Telescript(trademark). Further, Aglets(trademark) agents also may not communicate remotely across the network with regular Java method invocation syntax. Again, these serious restrictions make Aglets(trademark) very inflexible in inter-agent communications.
Accordingly, there is a need for inter-object and inter-agent communications across a computer network.
In accordance with the present invention, a method of communicating between objects across a computer network is provided which eliminates or substantially reduces the disadvantages associated with prior ORB and agent technologies.
In one aspect of the invention, a method for communicating between Java objects residing in different computer platforms linked by a network includes the steps of sending a message from a sender object to a virtual object in a first host address and port number, the virtual object being a virtual representation of a receiver object in a second host address and port number, and creating a messenger in the first host address and port number. The messenger is then sent to deliver the message, which carries an identity of the receiver object and destination address of the second host address and port number. At the second host address and port number, a meeting is invoked between the messenger and the receiver object for conveying the message thereto.
In another aspect of the invention, a method for communicating between Java objects residing in different computer platforms linked by a network includes the steps of sending a synchronous message from a sender object to a virtual object in a first host address and port number, the virtual object being a virtual representation of a receiver object in a second host address and port number, and creating a synchronous messenger in the first host address and port number. The messenger is then sent to deliver the synchronous message, which carries an identity of the receiver object, destination address of the second host address and port number, and the address of the result in the first host address and port number. At the second host address and port number, an encounter is invoked between the synchronous messenger and the receiver object for conveying the synchronous message thereto.
In another aspect of the invention, a method for communicating between Java objects residing in different computer platforms linked by a network includes the steps of sending an asynchronous message from a sender object to a virtual object in a first host address and port number, the virtual object being a virtual representation of a receiver object in a second host address and port number, and creating an asynchronous messenger in the first host address and port number. The messenger is then sent to deliver the asynchronous message, which carries an identity of the receiver object, and destination address of the second host address and port number. At the second host address and port number, an encounter is invoked between the asynchronous messenger and the receiver object for conveying the asynchronous message thereto. Any result is provided to sender object via the reference when sender object queries.